Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for ODroid HC4 #643

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DWSR
Copy link

@DWSR DWSR commented Dec 31, 2022

Adds the kernel module required to ensure proper functioning of the
ODroid HC4's GPU so that HDMI output works as expected.

Adds the kernel module required to ensure proper functioning of the
ODroid HC4's SATA ports.

Adds a u-boot variant for the ODroid HC4. This is not used directly, but
rather flashed into the SPI of the unit so that it can boot Talos.
Documentation on this process can be found in the Talos repo.

@DWSR DWSR changed the title Add support for ODroid HC4 feat: Add support for ODroid HC4 Dec 31, 2022
@DWSR DWSR changed the title feat: Add support for ODroid HC4 feat: add support for ODroid HC4 Dec 31, 2022
@DWSR DWSR force-pushed the add-odroid-hc4 branch 2 times, most recently from 7d7655b to 708d78e Compare January 31, 2023 03:36
@DWSR DWSR marked this pull request as ready for review January 31, 2023 03:37
@DWSR DWSR force-pushed the add-odroid-hc4 branch 3 times, most recently from 6906bc6 to 1521732 Compare January 31, 2023 04:31
Copy link
Member

@frezbo frezbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaned up some minor nits

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

/ok-to-test

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

seems the build is failing. I guess the amlogic script needs something extra

@DWSR
Copy link
Author

DWSR commented Jan 31, 2023

seems the build is failing. I guess the amlogic script needs something extra

I believe the amlogic script is calling an amd64 binary, given that it is assumed that the build environment for u-boot is amd64. This would also explain why it works on my machine where binfmt_misc is used to be able to run both amd64 and arm64 binaries simultaneously in the same builder.

Any chance the arm64 builder could be updated to support running amd64 binaries? It'll be slow when it's used, but for this particular use case it shouldn't really matter.

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

Any chance the arm64 builder could be updated to support running amd64 binaries?

we use dedicated arm64 builder for arm

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

anyways what binary it's calling, there could be arm64 variant of it

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

I would also check if the scrip is just creating a final binary blog with BL31 appended, then should be easy to change it to use dd

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

another option is to build the u-boot for odroid in the amd64 section only https://github.com/siderolabs/pkgs/blob/main/u-boot/pkg.yaml#L20 in the else part of this

@DWSR
Copy link
Author

DWSR commented Jan 31, 2023

we use dedicated arm64 builder for arm

Yes, I know. I'm wondering if that builder can be updated to include support for amd64 binaries for cases like this.

anyways what binary it's calling, there could be arm64 variant of it

It's calling aml_encrypt_g12a, which is vendored into the repo.

I would also check if the scrip is just creating a final binary blog with BL31 appended, then should be easy to change it to use dd

The script is signing the binaries in addition to other things. This isn't something that can be easily replaced with dd, as far as I can tell.

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

Yes, I know. I'm wondering if that builder can be updated to include support for amd64 binaries for cases like this.

you can build the whole u-boot for odroid in the amd64 section, and use CROSS_COMPILE option i believe

@DWSR
Copy link
Author

DWSR commented Jan 31, 2023

you can build the whole u-boot for odroid in the amd64 section, and use CROSS_COMPILE option i believe

Right, but how do we handle this further down the chain? The installer image is built with --platform=linux/arm64, for example.

It seems like it would be a lot cleaner to just enable binfmt_misc on the arm builder and use it sparingly rather than having to massively complicate the build chain for this special case.

@frezbo
Copy link
Member

frezbo commented Jan 31, 2023

binfmt_misc won;t work as the ci is on talos and the KSPP requires it to be disabled. The installer image can refer the amd64 in the talos dockerfile

@mircea-pavel-anton
Copy link

Would this also make talos work on an Odroid C4 and Odroid N2+?

@DWSR
Copy link
Author

DWSR commented Jun 17, 2023

@mirceanton The C4 and HC4 are identical with the exception of the SATA ports, so yes. I'm not as sure about the N2+, but I believe the answer is also yes.

All of those boards have support in the upstream kernel, so it's mostly a question of packaging Talos and getting the bootloader situation sorted.

Adds the kernel module required to ensure proper functioning of the
ODroid HC4's GPU so that HDMI output works as expected.

Adds the kernel module required to ensure proper functioning of the SATA
ODroid HC4's SATA ports.

Adds a u-boot variant for the ODroid HC4. This is not used directly, but
rather flashed into the SPI of the unit so that it can boot Talos.
Documentation on this process can be found in the Talos repo.

Signed-off-by: Brandon McNama <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
@frezbo
Copy link
Member

frezbo commented Mar 20, 2024

@DWSR this can be now moved to using an overlay. probably a new repo, since amlogic seems to be different from allwinner.

See this: https://github.com/siderolabs/overlays/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants